<?php

// incoming for catering page: 
	// $branch_id
	// $locale_number
	
	//NEXT - bring over $caterers and $menus and build arrays from them.
	
	// build nav links here
	
	$floristsURL = "/index.php/index/fdfloral";
	$caterersURL = "/index.php/index/fdcaterers";
	$acctURL = "/index.php/index/fdmyaccount";
	$faqURL = "/index.php/index/fdfaqhelp";
	$homeURL = "/index.php/index/fddashboard";
	$logoutURL = "/index.php/index/logout";
	
	$floristsHREF = "<a class=\"menuLinks\" href='$floristsURL'>Florists</a>";
	$caterersHREF = "<a class=\"menuLinks\" href='$caterersURL'>Caterers</a>";
	$acctHREF = "<a class=\"menuLinks\" href='$acctURL'>My Account</a>";
	$faqHREF = "<a class=\"menuLinks\" href='$faqURL'>Help/FAQ</a>";
	$homeHREF = "<a class=\"menuLinks\" href='$homeURL'>Dashboard</a>";
	$logoffHREF = "<a class=\"menuLinks\" href='$logoutURL'>Log Out</a>";
	$logoutHREF = "<a id=\"btnLogout\" href='$logoutURL'>Log Out</a>";
	//$urlBAR = "$acctHREF&nbsp;&#124;&nbsp;$faqHREF&nbsp;&#124;&nbsp;$caterersHREF&nbsp;&#124;&nbsp;$floristsHREF&nbsp;&#124;&nbsp;$logoffHREF";
	$urlBAR = "$acctHREF&nbsp;&#124;&nbsp;$caterersHREF&nbsp;&#124;&nbsp;$floristsHREF&nbsp;&#124;&nbsp;$logoffHREF";

	$arrangerName = $this->user_profile['fname']." ";
	$middleName = $this->user_profile['mname'];
	if(trim($middleName)!="") $arrangerName .= "$middleName ";
	$arrangerName .= $this->user_profile['lname'];	
 ?>
<?php echo  $this->doctype(Zend_View_Helper_Doctype::XHTML1_TRANSITIONAL)."\n"; ?>
<html>
 <head>
  <?php echo  $this->headTitle('Keystone Funeral Arranger'); ?>
  
	<style type="text/css">
		@import "/js/dijit/themes/tundra/tundra.css";
		@import "/js/dojox/grid/resources/tundraGrid.css";
		@import "/js/dojox/form/resources/DropDownSelect.css";
		@import "<!--/css/funeraldirector.css-->";
		@import "<!--/css/general2.css-->";
		
		@import "/css/vascore.css";
		@import "/css/sidebar.css";
		@import "/css/dashboard.css";
		
	</style>

	<script type="text/javascript">
    	djConfig = { isDebug: false, parseOnLoad:true };
	</script>
	
  <?php
      // grab the JS for this page
	    $this->headScript()->appendFile( JS_BASE."/dojo/dojo.js");    
    ?>
       
   <?php
     
   	echo "<script type=\"text/javascript\">var funeral_dir_id = '{$this->FD_license_number}';</script>";
    if($this->pageName == "CATERERS")
    {
	   	echo "<script type=\"text/javascript\">var current_branch = {$this->branch_number};</script>";
	   	echo "<script type=\"text/javascript\">var funeral_dir_id = '{$this->FD_license_number}';</script>";
   		$this->headScript()->appendFile( JS_BASE."/caterers.js" )."\n";
    }
    else
    if($this->pageName == "FLORISTS")
    {
	   	echo "<script type=\"text/javascript\">var current_branch = {$this->branch_number};</script>";
	   	echo "<script type=\"text/javascript\">var funeral_dir_id = '{$this->FD_license_number}';</script>";
   		$this->headScript()->appendFile( JS_BASE."/florists.js" )."\n";
    }
	else
	if($this->pageName == "FD_DASHBOARD")
	{
	   	echo "<script type=\"text/javascript\">var funeral_dir_id = '{$this->FD_license_number}';</script>";
        $this->headScript()->appendFile( JS_BASE."/fddashboardgrids.js" )."\n";
	}
    else
    if($this->pageName == "FDPROFILE")
    {
	   	echo "<script type=\"text/javascript\">var funeral_dir_id = {$this->FD_license_number};</script>";
    	$this->headScript()->appendFile( JS_BASE."/fdprofile.js")."\n";
    }
    
   	echo "\n<script type=\"text/javascript\">\n";
   	echo "var group_ids = '".$this->group_ids_str."';";
   	echo "</script>\n";
   	
   	echo $this->headScript();
   	
    ?>
 </head>
 <body class="admin">
 
 <div id="page">
 
 	<!-- page header -->
 	<div id="header">
 		<!-- basic keystone header plus admin name -->
		<!-- <table width="100%" border=0 cellpadding=0 class="tablelayout">
		   <tr>
		      <td><img src="<?php echo ART_BASE?>/keystone_logo2.jpg"></td>
		      <td width=50% align=center>
		      		Keystone Holdings, Inc.<br><h1>Virtual Arrangement System</h1>
		      </td>
		      <td width=25%><i>Arranger:</i><br><?php echo  $arrangerName ?><br><?php echo $urlBAR?></td>
		   </tr>
		</table> -->
		<div id="logo"><img src="<?php echo ART_BASE?>/keystone_logo2.jpg"></div>
		<div id="info">Keystone Group Holdings, Inc.<br><h1>Virtual Arrangement System</h1></div>
		<br clear="all">
		<div id="who">Welcome, <?php echo  $arrangerName ?> &nbsp;-&nbsp; <?php echo $urlBAR?></div>
 	</div>
 	 	
 	<div id="content">
 		<!-- <div id="leftnav" style="float:left"> -->
 		<div id="leftnav"><p>Menu</p><br>
 			<?php echo $homeHREF?>
 		</div>
 		<div id="main" class="main">
			<?php echo  $this->layout()->content; ?>
 		</div><br clear="all">
 		<!-- <div id="controls" style="text-align:right;"> -->
 		<div id="controls" class="main">
 			<?php echo $logoutHREF?>
 		</div><br clear="all">
 	</div>
 	
 	<div id="footer"> Virtual Arrangement System &copy; 2009 Keystone Group Holdings, Inc.
 	</div>
 </div> 
 </body>
</html>
